<!-- <!DOCTYPE html> -->
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Example</title>
	<link rel="stylesheet" href="../css/style.css">
	<script type="text/javascript" src="../../lib/paper.js"></script>
	<script type="text/paperscript" canvas="canvas">
		// http://en.wikipedia.org/wiki/Lenna
		var raster = new Raster('lenna');
		var lastScale = 1;
		var center = view.center;
		function onFrame(event) {
			var scale = (Math.sin(event.time * 2) + 1) / 2;
			raster.scale(scale / lastScale);
			lastScale = scale;
			raster.position = center + [Math.sin(event.time * 3) * 256, Math.sin(event.time * 2.5) * 256];
			raster.rotate(event.delta * 120);
		}
	</script>
</head>
<body>
	<canvas id="canvas" resize></canvas>
	<img width="512" height="512" id="lenna" style="display: none;" src="" />
</body>
</html>